@echo off

set /p port=Enter the port number:

echo Downloading Nodemon package...

echo Updating package.json...
echo { > package.json
echo   "name": "client", >> package.json
echo   "version": "1.0.0", >> package.json
echo   "description": "", >> package.json
echo   "main": "index.js", >> package.json
echo   "scripts": { >> package.json
echo     "start": "curl http://localhost:%port%/update-db", >> package.json
echo     "dev": "nodemon --watch assets --exec \"npm start\"" >> package.json
echo   }, >> package.json
echo   "author": "xy", >> package.json
echo   "license": "ISC", >> package.json
echo   "dependencies": { >> package.json
echo     "nodemon": "^3.0.1" >> package.json
echo   }, >> package.json
echo   "nodemonConfig": { >> package.json
echo     "ext": "js,json,ts" >> package.json
echo   } >> package.json
echo } >> package.json

npm install nodemon --save-dev

echo Done.